Namespace Bring2mind.DNN.Modules.UserFiles.Controls
 Public Class ModuleBase
  Inherits DotNetNuke.Entities.Modules.PortalModuleBase

#Region " Private Members "
  Private _settings As ModuleSettings
#End Region

  Public Property UserFilesSettings() As ModuleSettings
   Get

    If _settings Is Nothing Then
     Dim CacheKey As String = "Settings4Module" & Me.ModuleId & "inPortal" & Me.PortalId
     Try
      _settings = CType(Me.Cache.Item(CacheKey), ModuleSettings)
     Catch ex As Exception
     End Try
     If _settings Is Nothing Then
      _settings = New ModuleSettings(ModuleId)
      Me.Cache.Insert(CacheKey, _settings)
     End If
    End If

    Return _settings

   End Get
   Set(ByVal Value As ModuleSettings)
    _settings = Value
   End Set
  End Property

 End Class
End Namespace